<template>
  <div>
    <div
      class="information-item-container"
      v-for="(informationitem, index) in informationList"
      :key="index"
    >
      <div class="title-container">
        <div class="title">
          <div>{{ informationitem.title }}</div>
        </div>
        <div class="date">{{ informationitem.date }}</div>
      </div>
      <div class="content-img">
        <img :src="informationitem.img" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "InformationItemIndex",
  components: {},
  props: {
    informationList: {
      type: Array,
      required: true,
    },
  },
  data() {
    return {};
  },
  created() {},
  mounted() {},
  methods: {},
  computed: {},
  watch: {},
};
</script>

<style scoped lang="less">
.information-item-container {
  width: 100%;
  height: 135px;
  border-bottom: 1px solid #ebebeb;
  padding: 20px 0;
  box-sizing: border-box;
  display: flex;
  .title-container {
    width: 0;
    height: 100%;
    flex: 6;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-right: 20px;
    .title {
      font-size: 16px;
      line-height: 24px;
      div {
        width: 100%;

        // 多行文本溢出隐藏
        overflow: hidden;  // 溢出隐藏
        display: -webkit-box;  // 
        -webkit-box-orient: vertical;  // 垂直方向
        -webkit-line-clamp: 2;  // 两行文本
      }
    }
    .date {
      color: #757575;
      font-size: 12px;
    }
  }
  .content-img {
    height: 100%;
    flex: 4;
    box-sizing: border-box;
    overflow: hidden;
    img {
      width: 90%;
      border-radius: 20px;
    }
  }
}
</style>
